package ru.urfc.portal.ui.client.widgets;

import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.ui.CellPanel;
import com.google.gwt.user.client.ui.Widget;

public class AttachedFilesPanel extends CellPanel {
	
	public Element addRow(Widget... items) {
	    Element tr = DOM.createTR();
	    DOM.appendChild(getBody(), tr);
	    for (Widget item: items) {
	    	Element td = DOM.createTD();
	    	DOM.appendChild(tr, td);
	    	add(item, td);
	    }
	    return tr;
	}

	@Override
	public void clear() {
		super.clear();
		getBody().setInnerHTML("");
	}

}
